package com.bdqn.service.impl;

import com.bdqn.dao.easyUserDao;
import com.bdqn.pojo.easyuser;
import com.bdqn.service.easyUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class easyUserServiceImpl implements easyUserService {

    @Resource
    easyUserDao userDao;

    @Override
    public easyuser login(String name, String pwd) {
        return userDao.login(name, pwd);
    }

    @Override
    public List<easyuser> findAllByUsername(String name) {
        return userDao.findAllByUsername(name);
    }

    @Override
    public int deleteUserByid(Integer id) {
        return userDao.deleteUserByid(id);
    }

    @Override
    public int saveUser(easyuser user) {
        return userDao.saveUser(user);
    }

    @Override
    public int addUser(easyuser user) {
        return userDao.addUser(user);
    }

    @Override
    public easyuser getUserByid(Integer id) {
        return userDao.getUserByid(id);
    }

    @Override
    public int saveState(Integer id, boolean state) {
        return userDao.saveState(id, state);
    }

    @Override
    public List<String> findRole() {
        return userDao.findRole();
    }
}
